class Person {
  String ?userName="";
  String ?userPassword="";
  String ?imageUrl="";
  //<editor-fold desc="Data Methods">
  Person({
     this.userName,
     this.userPassword,
    this.imageUrl,
  });


  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
          (other is Person &&
              runtimeType == other.runtimeType &&
              userName == other.userName &&
              userPassword == other.userPassword &&
              imageUrl == other.imageUrl
          );


  @override
  int get hashCode =>
      userName.hashCode ^
      userPassword.hashCode ^
      imageUrl.hashCode;


  @override
  String toString() {
    return 'Person{' +
        ' userName: $userName,' +
        ' userPassword: $userPassword,' +
        ' imageUrl: $imageUrl,' +
        '}';
  }


  Person copyWith({
    String? userName,
    String? userPassword,
    String ? imageUrl,
  }) {
    return Person(
      userName: userName ?? this.userName,
      userPassword: userPassword ?? this.userPassword,
      imageUrl: imageUrl ?? this.imageUrl,
    );
  }


  Map<String, dynamic> toMap() {
    return {
      'userName': this.userName,
      'userPassword': this.userPassword,
      'imageUrl': this.imageUrl,
    };
  }

  factory Person.fromMap(Map<String, dynamic> map) {
    return Person(
      userName: map['userName'] as String,
      userPassword: map['userPassword'] as String,
      imageUrl: map['imageUrl'] as String,
    );
  }


//</editor-fold>
}